home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Python 1.1 / Include / thread.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-01  |  1.0 KB  |  50 lines  |  [TEXT/KAHL]

  1. #ifndef _THREAD_H_included
  2. #define _THREAD_H_included
  3.  
  4. #define NO_EXIT_PROG        /* don't define exit_prog() */
  5.                 /* (the result is no use of signals on SGI) */
  6.  
  7. #ifndef PROTO
  8. #if defined(__STDC__) || defined(__cplusplus)
  9. #define PROTO(args)    args
  10. #else
  11. #define PROTO(args)    ()
  12. #endif
  13. #endif
  14.  
  15. typedef void *type_lock;
  16. typedef void *type_sema;
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. void init_thread PROTO((void));
  23. int start_new_thread PROTO((void (*)(void *), void *));
  24. void exit_thread PROTO((void));
  25. void _exit_thread PROTO((void));
  26. long get_thread_ident PROTO((void));
  27.  
  28. type_lock allocate_lock PROTO((void));
  29. void free_lock PROTO((type_lock));
  30. int acquire_lock PROTO((type_lock, int));
  31. #define WAIT_LOCK    1
  32. #define NOWAIT_LOCK    0
  33. void release_lock PROTO((type_lock));
  34.  
  35. type_sema allocate_sema PROTO((int));
  36. void free_sema PROTO((type_sema));
  37. void down_sema PROTO((type_sema));
  38. void up_sema PROTO((type_sema));
  39.  
  40. #ifndef NO_EXIT_PROG
  41. void exit_prog PROTO((int));
  42. void _exit_prog PROTO((int));
  43. #endif
  44.  
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48.  
  49. #endif
  50.